<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">
	
<h:head>
<title> Dettaglio Elemento </title>
		<link rel="stylesheet" type="text/css" href="style/reset.css" media="screen,print" />
		<link rel="stylesheet" type="text/css" href="style/print.css" media="print" />
		<link rel="stylesheet" type="text/css" href="style/style.css" media="screen,print" />
		<link rel="stylesheet" type="text/css" href="style/template.css" media="screen" />
		<link rel="stylesheet" type="text/css" href="style/menu.css" media="screen" />
		<link rel="stylesheet" type="text/css" href="pcss/pagina-3.css" media="screen" />
	</h:head>

<h:body onload="#{ricerca.loadDettaglioAmm(param['id'])}">
		<div id="imHeaderBg"></div>
		<div id="imFooterBg"></div>
		<div id="imPage">
			<div id="imHeader">
				<h1 class="imHidden">Area Personale</h1>
			</div>
			<a class="imHidden" href="#imGoToCont" title="Salta il menu di navigazione">Vai ai contenuti</a>
			<a id="imGoToMenu"></a><p class="imHidden">Menu principale:</p>
			<div id="imMnMn" class="auto">
				<ul class="auto">
					<li id="imMnMnNode0">
						<a href="http://localhost:8080/TravelDreamOnlineWeb">
							<span class="imMnMnFirstBg">
								<span class="imMnMnTxt"><span class="imMnMnImg"></span>Home Page</span>
							</span>
						</a>
					</li><li id="imMnMnNode3" >
						<a href="http://localhost:8080/TravelDreamOnlineWeb/user/index.xhtml">
							<span class="imMnMnFirstBg">
								<span class="imMnMnTxt"><span class="imMnMnImg"></span>Area Personale</span>
							</span>
						</a>
					</li><li id="imMnMnNode4"  class="imMnMnCurrent">
						<a href="http://localhost:8080/TravelDreamOnlineWeb/admin/index.xhtml">
							<span class="imMnMnFirstBg">
								<span class="imMnMnTxt"><span class="imMnMnImg"></span>Area Riservata</span>
							</span>
						</a>
					</li><li id="imMnMnNode5">
						<a href="http://localhost:8080/TravelDreamOnlineWeb/contatti.html">
							<span class="imMnMnFirstBg">
								<span class="imMnMnTxt"><span class="imMnMnImg"></span>Contatti</span>
							</span>
						</a>
					</li>
				</ul>
			</div>
			<div id="imContentGraphics"></div>
			<div id="imContent">
			
<!--INSERIRE QUI LA PAGINA>
/////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////
<-->
<h1> Dettaglio elemento</h1>
    <h:form id="form">  
        
        <p:growl id="messages" showDetail="true"/>  
        
        <p:dataTable var="el" value="#{ricerca.selectedElemento}" id="elemento" editable="true">  
        
         <f:facet name="header">  
            Dettagli Generali
        </f:facet>  
        <p:ajax event="rowEdit" listener="#{ricerca.onEdit()}" update=":form:messages"/>  
  
        <p:column headerText="Nome" style="width:30%">  
            <p:cellEditor>  
                <f:facet name="output">  
                    <h:outputText value="#{el.nome}" />  
                </f:facet>  
                <f:facet name="input">  
                    <p:inputText value="#{el.nome}" style="width:100%"/>  
                </f:facet>  
            </p:cellEditor>  
        </p:column>
        
       <p:column headerText="Data" style="width:30%">  
            <p:cellEditor>  
                <f:facet name="output">  
                    <h:outputText value="#{el.data}" >
                      <f:convertDateTime dateStyle="short" type="date" />
                    </h:outputText> 
                </f:facet>  
                <f:facet name="input">  
                     <p:calendar value="#{el.data}" id="inlineCal" showButtonPanel="true" mindate="#{calendarBean.today}" widgetVar="calwidget" readonlyInput="true">  
           			 <p:ajax event="dateSelect" listener="#{calendarBean.handleDateSelect}" update=":form:messages" />  
       			 </p:calendar>   
                </f:facet>  
            </p:cellEditor>  
        </p:column>    
        
       <p:column headerText="Ora" style="width:30%">  
            <p:cellEditor>  
                <f:facet name="output">
                    <h:outputText value="#{el.ora}" />             
                </f:facet>  
                <f:facet name="input">  
                    <p:inputText value="#{el.ora}" style="width:100%">  
                    </p:inputText>
                </f:facet>  
            </p:cellEditor>  
        </p:column>  
        
       <p:column headerText="Prezzo" style="width:30%">  
            <p:cellEditor>  
                <f:facet name="output">  
                    <h:outputText value="#{el.prezzo}" />  
                </f:facet>  
                <f:facet name="input">  
                    <p:inputText value="#{el.prezzo}" style="width:100%">  
                    <f:validateDoubleRange minimum="0.0"/>
                    </p:inputText>
                </f:facet>  
            </p:cellEditor>  
       </p:column>    
         
         
    	<p:column style="width:6%">  
            <p:rowEditor />  
        </p:column>  
        
    </p:dataTable>  

    <p:dataTable var="volo" value="#{ricerca.volo}" id="volo" editable="true">  
        
         <f:facet name="header">  
           Dettagli del Volo
        </f:facet>  
        <p:ajax event="rowEdit" listener="#{ricerca.onEdit()}" update=":form:messages"/>  
  
        <p:column headerText="Città Partenza" style="width:30%">  
            <p:cellEditor>  
                <f:facet name="output">  
                    <h:outputText value="#{volo.cittàPartenza}" />  
                </f:facet>  
                <f:facet name="input">  
                    <p:inputText value="#{volo.cittàPartenza}" style="width:100%"/>  
                </f:facet>  
            </p:cellEditor>  
        </p:column>
        
        <p:column headerText="Città Arrivo" style="width:30%">  
            <p:cellEditor>  
                <f:facet name="output">
                    <h:outputText value="#{volo.cittàArrivo}" />  
                </f:facet>  
                <f:facet name="input">  
                    <p:inputText value="#{volo.cittàArrivo}" style="width:100%"/>  
                </f:facet>  
            </p:cellEditor>  
        </p:column>
        
        <p:column headerText="Compagnia" style="width:30%">  
            <p:cellEditor>  
                <f:facet name="output">
                    <h:outputText value="#{volo.compagnia}" />  
                </f:facet>  
                <f:facet name="input">  
                    <p:inputText value="#{volo.compagnia}" style="width:100%"/>  
                </f:facet>  
            </p:cellEditor>  
        </p:column>
        
       <p:column headerText="Numero Volo" style="width:30%">  
            <p:cellEditor>  
                <f:facet name="output">  
                    <h:outputText value="#{volo.numVolo}" />  
                </f:facet>  
                <f:facet name="input">  
                    <p:inputText value="#{volo.numVolo}" style="width:100%"/>  
                </f:facet>  
            </p:cellEditor>  
       </p:column>    
         
         
    	<p:column style="width:6%">  
            <p:rowEditor />  
        </p:column>  
        
    </p:dataTable>  
        <p:commandButton value="Indietro" oncomplete = "window.history.back();"/>
    </h:form>  
<!--FINE DELLA PAGINA>
/////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////
<-->						
				
								
			</div>		
			<div id="imFooter">
				
			</div>
	</div>
		<span class="imHidden"><a href="#imGoToCont" title="Rileggi i contenuti della pagina">Torna ai contenuti</a> | <a href="#imGoToMenu" title="Naviga ancora nella pagina">Torna al menu</a></span>
		
	<noscript class="imNoScript"><div class="alert alert-red">Per poter utilizzare questo sito è necessario attivare JavaScript.</div></noscript>
				</h:body>
</html>
